// 测试数据

import { businessT, cardDescript, cardKeyword, cardsT, driverT, drivingT, historyT, idCardBackT, idCardT, menuT, numberT } from "./types";

const testImage = 'https://n.sinaimg.cn/news/1_img/upload/72ef1310/384/w2048h1536/20231215/8e84-9b36f082c82642d14e4fd880da38a814.jpg'

const idcard: idCardT = {
  name: '李勇',
  gender: '男',
  nationality: '汉',
  address: '当调用 onMounted 时，Vue 会自动将回调函数注册到当前正被初始化的组件实例上。这意味着这些钩子应当在组件初始化时被同步注册',
  id: '130624xxxxxxxxx0022',
  _type: 'idCard',
  image_path: testImage,
}

const idcardback: idCardBackT = {
  _type: 'idCardBack',
  image_path: testImage,
}

const bankcard: numberT = {
  _type: 'bankCard',
  number: '6204 0000 1234 5678 923',
  image_path: testImage,
}

const driving: drivingT = {
  _type: 'drivingLicense',
  image_path: testImage,
  plate_num: '冀FF18001', 
  vehicle_type: '321', 
  owner: '李勇', 
  addr: '地址在哈哈哈哈哈', 
  use_character: '小型车', 
  model: '载客', 
  vin: 'SNvin123456', 
  engine_num: 'Xin123991', 
  register_date: '2022-10-10', 
  issue_date: '2023-10-33', 
  plate_num_b: '', 
  record: '', 
  passengers_num: '', 
  total_quality: '1.8t', 
  prepare_quality: '1.8t', 
  load_quality: '500kg', 
  lead_quality: '800kg', 
  overall_size: '2.2t', 
}

const driver: driverT = {
  _type: 'driverLicense',
  image_path: testImage,
  reg_num: '京FF123456',
  legal_representative: 'xxxx',
  enterprise_name: '',
  address: '地址哈哈哈',
}

const business: businessT = {
  _type: 'businessLicense',
  reg_num: '商CIP2x020202',
  legal_representative: 'xxxxxx',
  enterprise_name: '公司名',
  address: '地址',
  type_of_enterprise: '餐饮',
  business_scope: '北京',
  registered_capital: '',
  valid_period: '',
  registered_date: '',
  cert_position: '',
  image_path: testImage,
}
const menu: menuT = {
  _type: 'menu',
  menu: [
    {
      menu_name: '番茄炒鸡蛋',
      menu_price: 20.3
    },
    {
      menu_name: '宫保鸡丁',
      menu_price: 20.3
    },
  ],
  image_path: testImage,
}

const platenum: numberT = {
  _type: 'platenum',
  number: '冀FF1288888',
  image_path: testImage,
}

export const testCards: cardsT = [
  idcard,
  idcardback,
  bankcard,
  business,
  menu,
  platenum,
  driver,
  driving,
]

export function testHistory(): historyT[]{
  let history: historyT[] = []
  testCards?.forEach(item => {
    history.push({
      card: item,
      keyword: cardKeyword(item),
      descript: cardDescript(item),
    })
  })
  return history
}